/**
 * Copyright (c) 2025   All rights reserved.
 * <p>
 * https://www.sdl.io
 * <p>
 * 版权所有，侵权必究！
 */

package io.sdl.dao;

import io.sdl.common.dao.BaseDao;
import io.sdl.entity.TokenEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;

/**
 * 用户Token
 *
 * @authorDc 1211734836@qq.com
 */
@Mapper
public interface TokenDao extends BaseDao<TokenEntity> {
	TokenEntity getByToken(String token);

	TokenEntity getByTokenAMobile(String token, String mobile);

	TokenEntity getByUserId(Long userId);

	//检查token是否过期
	TokenEntity checkToken (@Param("token") String token, @Param("time")String time);
}
